//package com.demo2do.fms.admin;
//
//import com.demo2do.fms.admin.service.TestServiceImpl;
//import com.demo2do.fms.admin.service.authority.UserService;
//import com.demo2do.fms.admin.service.supplier.TractorService;
//import com.demo2do.fms.admin.service.supplier.TrailerService;
//import com.demo2do.fms.entity.vehicle.tractor.Tractor;
//import com.demo2do.fms.entity.vehicle.trailer.Trailer;
//import org.junit.Test;
//import org.junit.runner.RunWith;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.test.context.ContextConfiguration;
//import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
//import com.demo2do.fms.admin.service.TestService;
//
//import java.util.List;
//
//
//@RunWith(SpringJUnit4ClassRunner.class)
//@ContextConfiguration(locations = {"classpath*:/admin/applicationContext-configuration.xml",
//                                    "classpath*:/admin/applicationContext-dataAccess.xml",
//                                   "classpath*:/admin/applicationContext-rabbitmq.xml",
//                                    /*"classpath*:/admin/dev/applicationContext-dataAccess.xml"*/})
//public class SyncVehicleStatusToVam {
//
//    private static final Logger logger = LoggerFactory.getLogger(SyncVehicleStatusToVam.class);
//
//
//    @Autowired
//    private UserService userService;
//
//    @Autowired
//    private TestService testService;
//
//    @Autowired
//    private TractorService tractorService;
//
//    @Autowired
//    private TrailerService trailerService;
//
//    @Test
//    public void send() throws Exception {
//
//        List<Tractor> tractors = testService.listNeedSyncTractors();
//
//
//        logger.trace("tractors" + tractors.size());
//
//        for (Tractor tractor : tractors){
//            logger.trace("sync tractor id " + tractor.getId());
//            tractorService.adoptAuditing(tractor, 607847614L);
//        }
//
//        List<Trailer> trailers = testService.listNeedSyncTrailers();
//
//        logger.trace("trailers" + trailers.size());
//
//        for (Trailer trailer : trailers){
//            logger.trace("sync trailer id " + trailer.getId());
//            trailerService.adoptAuditing(trailer, 607847614L);
//        }
//
//
//
//    }
//
//}
